package com.dh.project.model.push;

/**
 * Created by Mc on 2016/10/12.
 */
public class PushAll {


    /**
     * platform : all
     * audience : {"alias":["深圳","北京"]}
     * notification : {"android":{"alert":"Hi, JPush!","title":"Send to Android","builder_id":1,"extras":{"newsid":321}},"ios":{"alert":"Hi, JPush!","sound":"default","badge":"+1","extras":{"newsid":321}}}
     * message : {"msg_content":"Hi,JPush","content_type":"text","title":"msg","extras":{"key":"value"}}
     * sms_message : {"content":"sms msg content","delay_time":3600}
     * options : {"time_to_live":60,"apns_production":false}
     */

    public String platform = "all";
    public String audience = "all";

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getAudience() {
        return audience;
    }

    public void setAudience(String audience) {
        this.audience = audience;
    }

    public OptionsBean getOptions() {
        return options;
    }

    public void setOptions(OptionsBean options) {
        this.options = options;
    }

    /**
     * android : {"alert":"Hi, JPush!","title":"Send to Android","builder_id":1,"extras":{"newsid":321}}
     * ios : {"alert":"Hi, JPush!","sound":"default","badge":"+1","extras":{"newsid":321}}
     */

    public NotificationBean notification;
    /**
     * msg_content : Hi,JPush
     * content_type : text
     * title : msg
     * extras : {"key":"value"}
     */

    public OptionsBean options;

    public NotificationBean getNotification() {
        return notification;
    }

    public void setNotification(NotificationBean notification) {
        this.notification = notification;
    }


    public PushAll(String notification, Object msg, int type) {
        this.notification = new NotificationBean(notification, msg, type);
        if (type == 2) {
            this.options = new OptionsBean();
        }

    }

}
